package com.star.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @Author star
 * @Date 2023/3/29 11:24
 * @PackageName:com.star.config
 * @ClassName: WebSocketConfig
 * @Description: TODO
 * @Version 1.0
 */
@Configuration
public class WebSocketConfig {
    @Bean
    //注入ServerEndpointExporter 自动注册使用@ServerEndpoint("/chat")注解的bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}
